extends Node
var query: QueryManager

# global funcs here
var _map := {}  #funcs map


func exec(name: String, args: Array):
	var ref: FuncRef = _map.get(name)
	if ref:
		if not ref.is_valid():
			push_error("func %s is not valid" % name)
			return
		ref.call_funcv(args)
	else:
		push_error("func not found: %s" % name)


func reg(name: String, ref: FuncRef):
	_map[name] = ref
